--CREATE PROCEDURE absentofmonth(@year int=1390,@month int=1)
--as
--BEGIN
--return SELECT DISTINCT profile.employeid,name,family,entry.year,entry.month,entry.day FROM profile,entry WHERE entry.year=@year and entry.month=@month and entry.day between 1 and 31 and not exists (select employeid from entry Where profile.employeid=entry.employeid) order by entry.day
--END

--create procedure increase_extra(@x int = 5)
--as
--begin
--update profile
--set fix_extra = fix_extra + (fix_extra* @x/100)

--end

--execute increase_extra

create procedure ignore_endtime(@fix char(2) =7)
as
begin
declare @ex_time char(2)

select @ex_time = endhour from vacation
if @ex_time> @fix
set @ex_time = @fix
return @ex_time 

end

go 

execute ignore_endtime

